﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace Didsoft.SalesLive.UI.Views.ViewModel
{
    public class ViewModelBase : INotifyPropertyChanged
    {

        #region Notificador ViewModel

        public event PropertyChangedEventHandler PropertyChanged;
        public void Notificar(string propiedad)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propiedad));
        }

        #endregion

       


    }


    public static class Extensions
    {
        #region metodos utiles

        public static System.Collections.ObjectModel.ObservableCollection<T> ToObservableCollection<T>(this System.Collections.Generic.IEnumerable<T> source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            return new System.Collections.ObjectModel.ObservableCollection<T>(source);
        }

        #endregion

    }

}
